package com.power.sifa.correction.api;

import com.plf.common.domain.ResponseDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import com.power.sifa.correction.model.Crw_rule_group;
import com.power.sifa.correction.model.pageInfo.Crw_rule_groupPageInfo;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 *  预警规则的人群分组 Feign
 */
public interface ICrw_rule_groupFeign {

    /**
     * 预警规则的人群分组分页列表
     */
    @PostMapping("/crw_rule_group/list")
    ResponseDTO list(@RequestBody Crw_rule_groupPageInfo crw_rule_groupPageInfo);

    /**
    * 查看预警规则的人群分组
    */
    @GetMapping("/crw_rule_group/view")
    ResponseDTO view(@RequestParam("id") String id);

    /**
    * 删除预警规则的人群分组
    */
    @PostMapping("/crw_rule_group/delete")
    ResponseDTO delete(@RequestParam("id") String id);

    ///**
    // * 查看预警规则的人群分组 复合主键使用
    // */
    //@PostMapping("/crw_rule_group/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Crw_rule_group.Crw_rule_groupPK pk);

    /**
     * 修改或保存预警规则的人群分组
     */
    @PostMapping("/crw_rule_group/save")
    ResponseDTO save(@RequestBody Crw_rule_group  crw_rule_group);

    ///**
    // * 删除预警规则的人群分组 复合主键使用
    // */
    //@PostMapping("/crw_rule_group/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Crw_rule_group.Crw_rule_groupPK pk);
    
    /**
     * 批量删除预警规则的人群分组
     */
    @PostMapping("/crw_rule_group/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);
    
     /**
     * 导出excel
     */
    @PostMapping("/crw_rule_group/output")
    void output(HttpServletResponse response, @RequestBody Crw_rule_groupPageInfo crw_rule_groupPageInfo);
        
     /**
     * 导出excel模板
     */
    @PostMapping("/crw_rule_group/exportExcelTemplate")
    void exportExcelTemplate(HttpServletResponse response);
    
     /**
     *	导入excel
     */
    @PostMapping("/crw_rule_group/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException ;


    /**
     * 根据规则id查询对应人员分组id
     */
    @GetMapping("/crw_rule_group/groupIdsByRuleId")
    ResponseDTO<List<String>> groupIdsByRuleId(@RequestParam("ruleId") String ruleId);
}
